package com.cmbchina.creditcard.domain;

public enum CardTypeEnum {

    GOLDEN("金普卡"),
    BUSINESS("商务卡");

    CardTypeEnum(String type) {
        this.type = type;
    }

    private String type;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public static CardTypeEnum getEnumByType(String type){
        for (CardTypeEnum cardTypeEnum : values()) {
            if(cardTypeEnum.getType().equalsIgnoreCase(type)){
                return cardTypeEnum;
            }
        }
        return null;
    }
}
